package com.ruoyi.personnel.management.nation.service;

import com.ruoyi.personnel.management.nation.domain.NationCond;
import com.ruoyi.personnel.management.nation.domain.NationDomain;
import com.ruoyi.personnel.management.nation.mapper.NationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 民族
 * 业务处理层
 */
@Service
public class NationServiceImpl implements INationService{
    @Autowired
    private NationMapper nationMapper;

    /**
     * 根据搜索条件所有查询民族信息
     * @param cond 搜索条件
     * @return
     */
    @Override
    public List<NationDomain> selectNationList(NationCond cond) {
        return nationMapper.selectNationList(cond);
    }

    /**
     * 新增民族信息
     * @param nation
     * @return
     */
    @Override
    public int insertNation(NationDomain nation) {
        return nationMapper.insertNation(nation);
    }

    /**
     * 修改民族信息
     * @param nation
     * @return
     */
    @Override
    public int updateNation(NationDomain nation) {
        return nationMapper.updateNation(nation);
    }

    /**
     * 删除民族信息
     * 仅修改删除标志
     * @param nation
     * @return
     */
    @Override
    public int updateNationDeleteFlag(NationDomain nation) {
        return nationMapper.updateNationDeleteFlag(nation);
    }
}
